import request from "../utils/request";
// 分页按条件查询
export const queryShowPageApi = (
    name, gender, begin, end, page, pageSize
)=>request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)

// 根据id删除员工
export const deleteEmpById = (ids) => request.delete(`/emps?ids=${ids}`)

// 新增员工
export const addEmpApi = (emp) => request.post('/emps', emp)

// 根据id查询数据
export const queryByIdApi = (id) => request.get(`/emps/${id}`)

// 更新数据
export const updateApi = (emp) => request.put(`/emps`, emp)